<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

class MY_Form_validation extends CI_Form_validation {

    function __construct() {
        parent::__construct();
    }
    
    /**
     * Valid Captcha
     * 
     * @access	public
     * @param	string
     * @return	bool
     */
    public function valid_captcha($str){
        $session = new CI_Session();
        if ($str == $session->userdata('cap_wd')){
           return TRUE;
        } else {
             //$this->set_message('Captcha', 'The %s field can not be the word "'.$str.'"');
           return FALSE;
        }
        $session->unset_userdata('cap_wd');
    }
    
}